#!/usr/bin/perl
# file ch1_3_2.pl

# while(<>){
#     chomp($_);
#     print "$_\n";
# }


my $buffer;
# while(1){
#     $bytes = read(STDIN, $buffer, 50, length($buffer));
#     last unless $bytes > 0;
#     print $buffer;
# }

while(1){
    $bytes = sysread(STDIN, $buffer, 50, length($buffer));
    last unless $bytes > 0;
    print $buffer;
}